﻿package cn.kxm.service;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.kxm.pojo.*;

public interface CompanyService {

	public List<Company> findAll(String code,String name,Integer type,
			Integer page,Integer size);
	
	public int getCount(String code,String name,Integer type);
	
	public List<Company> getCompanys(List<Integer> types,String name,String code,Integer page,Integer size);
    public int getCompanyCount(List<Integer> types,String name,String code);

	/**
	 * 根据条件查询供应商信息
	 * @param company
	 * @param pageSize
	 * @param currentPageNo
	 * @return
	 */
	public List<Company>getCompanyAll(Company company,Integer pageSize
			,Integer currentPageNo);
	/**
	 * 根据条件查询供应商数量
	 * @param company
	 * @return
	 */
	public int getCompanyCountt(Company company);
	/**
	 * 根据条件查询相关供应商及详细信息
	 * @param company
	 * @param pageSize
	 * @param currentPageNo
	 * @return
	 */
	public List<Map<String, Object>> getCompany_Detiail(Company company,Integer pageSize,Integer currentPageNo);
	/**
	 * 根据编号查询供应商明细信息
	 * @param code
	 * @return
	 */
	public Map<String, Object> getCompanydetailsByCode(String code);
	/**
	 * 添加供应商信息
	 * @param company
	 * @return
	 */
	public int addCompany(Company company);
	/**
	 * 添加供应商明细
	 * @param companydetail
	 * @return
	 */
	public int addCompanydetail(Companydetail companydetail);
	/**
	 * 修改供应商明细
	 * @param companydetail
	 * @return
	 */
	public int modifyCompanydetail(Companydetail companydetail);
	/**
	 * 修改供应商
	 * @param companydetail
	 * @return
	 */
	public int modifyCompany(Company company);
	/**
	 * 删除供应商明细
	 * @param companydetail
	 * @return
	 */
	public int delCompanydetail(String  code);
	/**
	 * 删除供应商
	 * @param code
	 * @return
	 */
	public int delCompany(String code);
	public int getCompanyCounttt(Company company);
}
